package com.rainng.coursesystem.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


@TableName("team")
@Data
public class TeamEntity {
    public static final String ID = "team_id";
    public static final String ACTIVITY_ID = "team_activity_id";
    public static final String NUMBER = "team_number";
    public static final String NAME = "team_name";

    @NotNull
    @TableId(value = ID, type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "必须选择所属地区")
    @TableField(ACTIVITY_ID)
    private Integer activityId;

    @NotNull
    @Range(min = 0, max = 50, message = "团最大人数必须在0-50之间")
    @TableField(NUMBER)
    private Integer number;

    @NotBlank(message = "团名不能为空")
    @TableField(NAME)
    private String name;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getActivityId() {
		return activityId;
	}

	public void setActivityId(Integer activityId) { this.activityId = activityId; }

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
    
    
}
